package com.yfp.operation.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yfp.common.core.annotation.Excel;
import com.yfp.common.core.text.BigDecimalSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 券包销售数据查询结果
 */
@Data
public class ComboSalesVO {

    /**
     * 商品Id
     */
    @Schema(description = "商品Id")
    private String comboId;

    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    @Schema(description = "商品名称")
    private String comboName;

    /**
     * 点位
     */
    @Excel(name = "点位")
    @Schema(description = "点位")
    private Integer positionCount;

    /**
     * 上架日期
     */
    @Excel(name = "上架日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "上架日期")
    private Date firstSaleTime;

    /**
     * 最近售卖日期
     */
    @Excel(name = "最近售卖日期", dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @Schema(description = "最近售卖日期")
    private Date lastSaleTime;

    /**
     * 投放次数
     */
    @Excel(name = "投放次数")
    @Schema(description = "投放次数")
    private Integer shelfCount;

    /**
     * 销量（累计）
     */
    @Excel(name = "销量（累计）")
    @Schema(description = "销量（累计）")
    private Integer totalSaleNum;

    /**
     * 日均销量
     */
    @Excel(name = "日均销量", scale = 2)
    @Schema(description = "日均销量")
    @JsonSerialize(using = BigDecimalSerializer.class)
    private BigDecimal avgSaleNum;

    /**
     * 售卖率
     */
    @Excel(name = "售卖率", scale = 2, suffix = "%")
    @Schema(description = "售卖率")
    @JsonSerialize(using = BigDecimalSerializer.class)
    private BigDecimal repurchaseRate;

    /**
     * 投放（累计）
     */
    @Schema(description = "投放（累计）")
    private Integer shelfTotalSales;
}
